home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
1833
/
1833.xpi
/
chrome
/
m
/
yoono.com
/
sidebar.jar
/
sidebar
/
js
/
thinContextMenu.js
< prev
next >
Wrap
Text File
|
2009-12-16
|
2KB
|
1 lines
var pop=null;function thinContextMenu(a,k){this.closingTimer=null;this.popupHelper=new PopupHelper(this,null,null,true);var m=this;this.popupHelper.closeHandler=m.close;this.doc=document;this.sidebar=a;this.thinWrapperElt=yoono.dom.up(k,"thinyoodget");if(this.thinWrapperElt){this.doc.body.addClassName("onyoodget")}var g=this.sidebar.YEXTIF.execFct("getUserCredential");if(this.sidebar.isThin()){yoono.dom.hide(yoono.dom.$("menu-item-minimizeSidebar"))}else{yoono.dom.hide(yoono.dom.$("menu-item-maximizeSidebar"))}if(!g||g.anonymous){this.doc.body.addClassName("showsignin")}this.popupHelper.setAutoCloseHandlers();var n=YServices.skin.getSkinList();var f=0;var c="";for(var e in n){f++;var o=n[e];c+='<div class="menu-color-box" skin-id="'+e+'" style="background-color:'+o.bg+'" ></div>'}if(f>0){yoono.dom.$("color-boxes").innerHTML=c}var b="";var h=YServices.skin.getTextSizeList();for(var d in h){var l=h[d];b+='<div class="menu-text-size" text-size="'+l.css+'">'+this.sidebar.translateText(l.name)+"</div>"}if(b){yoono.dom.$("text-size-box").innerHTML=b}}thinContextMenu.prototype.click=function(b){b=b||window.event;var d=b.target||b.srcElement;var a=d;if(!yoono.dom.hasClassName(a,"menu-item")){a=yoono.dom.up(d,"menu-item")}var c=a.readAttribute("value");var e="";if(c=="skin"){e=d.getAttribute("skin-id")}else{if(c=="text-size"){e=d.getAttribute("text-size")}}pop.sidebar.executeMenuValue(c,e)};thinContextMenu.prototype.menuClick=function(a){if(Prototype.Browser.IE){var b=yoono.dom.up(event.srcElement,"menu-item");if(!b){return}if(b.getAttribute("value")!="add"){this.popupHelper.close()}}else{this.popupHelper.close()}};thinContextMenu.prototype.startClosing=function(b){try{var a=this;clearInterval(this.closingTimer);this.closingTimer=setTimeout(function(){a.close()},100)}catch(c){this.sidebar.YEXTIF.logError("startClosing :"+c)}};thinContextMenu.prototype.stopClosing=function(a){try{alertDigest.sidebar.YEXTIF.logError("stopClosing "+a.target.localName);if("HTML"==a.target.localName){return}if(this.closingTimer){clearInterval(this.closingTimer)}}catch(b){this.sidebar.YEXTIF.logError("startClosing :"+b)}};thinContextMenu.prototype.close=function(){this.popupHelper.closeNew()};function yoonoPopupInit(b,a){yoono.require(["yoono.event","yoono.lang","yoono.dom","yoono.localization"]);pop=new thinContextMenu(b,a)};